package com.jrx.anytxn.investor.job.file.repay.order.step;

import com.jrx.anytxn.investor.entity.TlPaymentInvestorMapping;
import com.jrx.anytxn.param.entity.PrOrganizationTable;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.batch.MyBatisPagingItemReader;

import java.util.HashMap;
import java.util.Map;

public class RepayOrderReader extends MyBatisPagingItemReader<TlPaymentInvestorMapping> {

    public RepayOrderReader(SqlSessionFactory sqlSessionFactory, Integer pagesize, PrOrganizationTable org ){
        setSaveState(false);
        setPageSize(pagesize);
        setSqlSessionFactory(sqlSessionFactory);
        setQueryId("com.jrx.anytxn.investor.mapper.ext.ExtTlPaymentInvestorMappingMapper.selectByBusinessDate");
        Map<String, Object> map = new HashMap<>();
        map.put("businessDate", org.getToday());
        setParameterValues(map);
    }
}
